package cate.game.stat.game;

import cate.game.framework.ModuleMan;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class StatGameHandler extends ModuleMan {

    private long roleNum;

    @Override
    public void initDependent() throws Exception {
        roleNum = this.game.facilities.getMongo().roleBase.count();
        log.info("srvId={}, roleNum={}", game.config.srvId, roleNum);
    }

    public void addRoleNum() {
        roleNum++;
    }

    public int getRoleNum() {
        return (int)this.roleNum;
    }
}
